package main.java.gui;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.net.Socket;

import main.java.products.Contrepartie;

public class Slave {
	Socket ssock;
	 public Slave(Socket s) {
	 this.ssock = s;
	 }
	 public void run() throws IOException, ClassNotFoundException {
		 ObjectInputStream ois = new ObjectInputStream(
				 ssock.getInputStream());
		Contrepartie v = (Contrepartie) ois.readObject();
	 System.out.println("voiture recue : "+ v.toString());
	 	ssock.close();
	 }

}
